package ex2b.model.semaforos;

import java.util.Collection;
import java.util.concurrent.Semaphore;

public class OpenSemaphore extends Semaphore {
	private static final long serialVersionUID = 1L;
	private String name;
	
	public OpenSemaphore( int permits, String name ) {
		super( permits );
		this.name = name;
	}
	
	public OpenSemaphore(int permits) {
		super( permits );
	}
	
	public OpenSemaphore(int permits, boolean fair) {
		super( permits, fair );
	}
	
	public Collection<Thread> getQueuedThreads() {
		return super.getQueuedThreads();
	}
	
	public String toString() {
		return name + ": " + this.availablePermits();
	}
}
